#!/usr/bin/env python3
"""
生涯分析服务启动脚本
"""

import uvicorn
import sys
from pathlib import Path

def start_career_service():
    """启动生涯分析服务"""
    print("🚀 启动生涯分析 API 服务...")
    print("📍 服务地址: http://localhost:8002")
    print("📚 API 文档: http://localhost:8002/docs")
    print("🔍 健康检查: http://localhost:8002/health")
    print("-" * 50)
    
    try:
        uvicorn.run(
            "career_api:app",
            host="0.0.0.0",
            port=8002,
            reload=True,
            log_level="info"
        )
    except KeyboardInterrupt:
        print("\n👋 生涯分析服务已停止")
    except Exception as e:
        print(f"❌ 启动服务失败: {e}")

if __name__ == "__main__":
    start_career_service()
